<script lang='ts'>
import { ref } from 'vue';


export default {
    beforeCreate() {
        console.log("V2:beforeCreate")
    },
    created() {
        console.log("V2:created")
    },
    beforeMount() {
        console.log("V2:beforeMount")
    },
    mounted() {
        console.log("V2:mounted")
    },
    beforeUpdate() {
        console.log("V2:beforeUpdate")
    },
    updated() {
        console.log("V2:updated")
    },
    beforeUnmount() {
        console.log("V2:beforeUnmount")
    },
    unmounted() {
        console.log("V2:unmounted")
    },
    data(){
        return {
            username:'张三'
        }
    }
}
</script>

<template>
 <p>{{ username }}</p>
 <input type="text" v-model="username"/>
</template>

<style scoped></style>